#ifndef __ATL_DRI_H__
#define __ATL_DRI_H__
#include <stdint.h>
#include <ux86.h>
#include <ufst.h>
#include <syscall.h>
#ifdef __cplusplus
extern "C"{
#endif
#define DRI_DRIVER_MAGIC 0xC001C0DE
#define DRI_CLASS_CHAR 0x0
#define DRI_CLASS_BLOCK 0x1

typedef void(*dri_driver_main)();
typedef void(*dri_driver_sci_init)(syscall_handler);

	typedef struct dri_driver_descriptor {
		uint32_t driver_magic;
		uint32_t driver_class;
		uint32_t driver_id;
		char	 driver_name[32];
		void *   driver_class_desc;
		dri_driver_sci_init init_sci;
		dri_driver_main driver_main;
	} dri_driver_descriptor_t;

typedef void(*dri_interrupt_handler)(registers_t);
void dri_syscall_initialize(syscall_handler handler);
void dri_set_kmode_sci();
void dri_set_user_sci();
void dri_register_interrupt(uint8_t irq, dri_interrupt_handler handler);
void dri_register_specfile(char *name,uint32_t flags,uint32_t inode,uint32_t mode,read_fs_t read_hook,write_fs_t write_hook);
void dri_register_driver(dri_driver_descriptor_t *desc);

#ifdef __cplusplus
}
#endif
#endif